// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_b.p_a;

import com.nnee.p_fk.p_b.*;
import java.util.*;

// Referenced classes of package com.nnee.b.a:
//            ag

public abstract class cls_j extends cls_ag
    implements com.nnee.p_fk.p_b.cls_d
{

    protected cls_j(int i)
    {
        super(i);
        m = new Object[0];
    }

    private void e(int i)
    {
    	cls_a a1 = null;
        if(n == null) {} else {
        	Object aobj[] = m;
            
            Iterator iterator = n.iterator();
            if(!iterator.hasNext()) {
            	a1 = null;
            	if(a1 != null)
                    n.remove(a1);
            }else 
            {
            	while(iterator.hasNext())
            	{
            	  a1 = (cls_a)iterator.next();
            	  if(a1.m() != i) {} else 
            	  {
            		  if(a1 != null)
            	            n.remove(a1);
            		  return;
            	  }
            	}
            }
        }

    }

    protected cls_a a(int i)
    {
    	cls_a a1 = null;
        if(n == null) {
        	a1 = null;
        } else {
        	Object aobj[] = m;
            
            Iterator iterator = n.iterator();
            
            if(!iterator.hasNext()) {
            	a1 = null;
            }else {
            	while(iterator.hasNext())
            	{
            	  a1 = (cls_a)iterator.next();
            	  if(a1.m() != i) {} else 
            	  {
            		  if(a1 != null)
            	            n.remove(a1);
            		  break;
            	  }
            	}
            }
        }
        
        return a1;
 
    }

    public final void a(int i, int k, int i1, Object obj)
    {
        if(i != -1000)
            e(i1);
        c(i, k, i1, obj);
        if(f())
            h();
    }

    protected void a(cls_a a1)
    {
        a(a1, true);
    }

    protected void a(cls_a a1, boolean flag)
    {
        a1.c(l());
        a1.b(j());
        a1.a((com.nnee.p_fk.p_b.cls_d)this);
        synchronized(m)
        {
            if(n == null)
                n = new LinkedList();
            n.add(a1);
        }
        if(flag)
            g().a(a1);
        return;
      
    }

    protected void b()
    {
        if(n != null){
        	 Object aobj[] = m;
             
             Iterator iterator = n.iterator();
             do
             {
                 if(!iterator.hasNext())
                     break;
                 cls_a a1 = (cls_a)iterator.next();
                 if(g().a(Integer.valueOf(a1.m())) == null)
                     g().a(a1);
             } while(true);
             
        }
 
    }

    public final void b(int i, int k, int i1, Object obj)
    {
        if(i != -1000)
            e(i1);
        d(i, k, i1, obj);
        if(f())
            h();
    }

    public abstract void c(int i, int k, int i1, Object obj);

    public abstract void d(int i, int k, int i1, Object obj);

    public void e()
    {
        super.e();
        if(n == null) {}else {
        	Object aobj[] = m;
            
            for(Iterator iterator = n.iterator(); iterator.hasNext(); ((cls_a)iterator.next()).e());
             
        }
 
    }

    protected boolean f()
    {
        boolean flag;
        if(n == null || n.size() == 0)
            flag = true;
        else
            flag = false;
        return flag;
    }

    protected static final int l = -1000;
    Object m[];
    List n;
}
